{% extends "/lenta/base.html" %}

{% from 'lenta/note/macros.jinja' import note_form_js %}


{% block inline_style_block %}

	{{ super() }}

	#wrap {
		margin: 30px 20px 30px 15px;
	}
	
	div.form-element {
		margin: 7px 5px 7px 5px;
	}
	
	#second_form_section {
		margin: 10px 0 10px 0px;
		padding: 10px 10px 10px 10px;
		background: #E8EDFA;
	}
	#second_form_section label {
		width: 100px;
		display: inline-block;
		font-size: 14px;
	}

{% endblock inline_style_block %}


{% block inline_js %}

$(document).ready(function () {

 	$('#pubdate_id').datetimepicker({
 		dateFormat: 'yy-mm-dd',
    	timeFormat: 'hh:mm:ss',
    	showSecond: true
    });

	{{ note_form_js(c.debug_clientside) | safe }}
});

{% endblock %}


{% block main_content %}
  
  <div id="wrap">  
    <form action="" method="post" id="note_form">
        
        {{ note_form (note, errors)|safe }}

        <button name="button" class="submit_button">Send</button>
    </form>
    
    <p style="text-align: right;">
      <a href="{{url_for('lenta.delete_note',
                        lenta_id=c.view_args.lenta_id,
                        note_id=c.view_args.note_id)}}" class="delete">delete</a>
    </p>
  </div>                      

{% endblock main_content %}